package com.pcj.blog.service;
/**
 * @param
 * @author pcj
 * @date 2021/12/29 11:07
 * @return
 */

import com.pcj.blog.po.Blog;
import com.pcj.blog.po.Tag;
import com.pcj.blog.vo.BlogVo;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.Pageable;

import java.util.List;
import java.util.Map;

/**
 *
 * @className BlogService
 * @author pengcj
 * @date 2021/12/29 11:07
 */

public interface BlogService {
    Blog getBlog(Long id);
    Blog getAndConverd(Long id);
    Page<Blog> listBlog(Pageable pageable, BlogVo blog);
    Blog saveBlog(Blog  blog);
    Blog updateBlog(Long id,Blog blog);
    void deleteBlog(Long id);
    Page<Blog> listBlog(Pageable pageable);
    Page<Blog> listBlog(String query,Pageable pageable);
    List<Blog> listTop(Integer size);  //推荐博客
    Page<Blog> ListBlog(Long tagid, Pageable pageable);  //根据tagid 查询博客

    //归档  不需要参数 对所有博客进行归档
    Map<String ,List<Blog> >archiveBlog();

    Long countBlog();
}
